import request from "@/utils/request";

export function getIndexData(){       //
    return request({
        url:"/admin/home/home",
        method:"get",
    })
}

export function getHomeDirectory(){       //获取推荐数据目录
    return request({
        url:"/home/directory",
        method:"get",
    })
}

export function editHome(data){       //新增/修改Home[管理端]
    return request({
        url : "/home/edit",
        method : "post",
        data
    })
}

export function delHome(){       //新增/修改Home[管理端]
    return request({
        url:"/home/del",
        method:"get",
    })
}

export function getIndexDetail(id){       //
    return request({
        url : "/home/detail/" + id,
        method : "get",
    })
}
export function refreshIndexDetail(id){       //
    return request({
        url : "/home/refresh",
        method : "get",
        params : {
            id
        }
    })
}

export default {
    getIndexData,
    editHome,
    delHome,
    getIndexDetail,
    refreshIndexDetail
}